import type { RouteRecordRaw } from 'vue-router'

const route: RouteRecordRaw[] = [
    {
        path: '/',
        redirect: '/login'
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/auth/login/index.vue')
    },
    {
        path: '/register',
        name: 'register',
        component: () => import('@/views/auth/register/index.vue')
    },
    {
        path: '/resetInfo',
        name: 'resetInfo',
        component: () => import('@/views/auth/reset-password/index.vue')

    },
    {
        path: '/home',
        name: 'home',
        component: () => import('@/views/home/index.vue'),
        children: [
            {
                path: '',
                name: 'home-default',
                component:() => import('@/views/home/components/Home.vue')
            },
            {
                path: 'dish',
                name: 'dish',
                component: () => import('@/views/home/components/dish/index.vue'),
            },
            {
                path: 'mine',
                name: 'mine',
                component: () => import('@/views/home/components/mine/index.vue'),
            },
            {
                path: 'message',
                name: 'message',
                component: () => import('@/views/home/components/message/index.vue'),
            }
        ]
    },
]

export default route